<div class="container"> 
<!-- middle -->
<div id="middle" class="cols2">
    <div class="content" role="main">
		<!-- add comment -->
        <div class="add-comment" id="addcomments">
			<h3>Update Current Post</h3>  
			<div class="post-meta">
				<a target="_blank" onClick="return confirm('Are you sure you want to Preview this Post !')" href="<?=site_url('post/read/'.$post['post_year'].'/'.$post['post_month_'].'/'.$post['post_day'].'/'.$post['post_id'].'/'.seoUrl($post['post_title']))?>" class="author">Preview</a> <span class="separator">|</span>
				<a onClick="return confirm('Are you sure you want to Remove this Post !')"  href="<?=site_url('post/remove/'.$post['post_id'])?>" class="author">Remove</a>
			</div>	
			<div class="comment-form">
            <?=form_open_multipart('post/update','id="commentForm"');?>
				<?=form_hidden('id',$post['post_id'])?>
                <div class="row field_text">
					<label class="label_title"><strong>Title</strong></label>
					<input type="text" name="title" value="<?=$post['post_title']?>" style="width:500px" class="inputtext input_large required">
                </div>
				
				
				
				<div class="row field_text">
					<label class="label_title"><strong>Old Picture</strong></label>
					
					<img src="<?=base_url().thumb(postImage($post['post_image']),seoUrl($post['post_title']),100,200)?>" alt="">
                </div>
				
				<div class="row field_text">
					<label class="label_title"><strong>Image & Thumbnail</strong></label>
					<?=form_upload('image','class="inputtext input_large required"')?>
                </div>
				
				<div class="row field_select">
                    <label class="label_title"><strong>Category:</strong></label>
                     <?=form_dropdown('category',$cat,$post['post_category'],'id="contact_subject" class="select_styled"')?>
                </div>
					
				<div class="row field_textarea">
                    <label class="label_title"><strong>Content</strong></label>
					 <?php
						$CKEditor = ckEditor();
						$CKEditor->basePath = base_url().APPPATH.'third_party/ckeditor/';
					 ?>		
                     <?=$CKEditor->editor("content",$post['post_content'])?>
                </div>
                                
                <div class="row rowSubmit">
                    <input type="submit" value="Save" class="btn-submit">
                </div>
            </form>
			</div>
        </div>
		<!--/add comment -->
	</div>
    <!--/ content -->
    
    <!-- sidebar -->
    <div class="sidebar">

		<!-- recent entries -->
    	<div class="widget-container widget_recent_entries">
        	<img src="images/icons/icons_16_date.png" alt="" class="widget_icon">  
			<h3 class="widget-title">Latest News</h3>
                <ul>
                    <?php foreach($latest as $rec): ?>
					<li>
                        <a href="<?=postUrl($rec['post_date'],$rec['post_id'],$rec['post_title'])?>"><img src="<?=base_url().thumb(postImage($rec['post_image']),seoUrl($rec['post_title']),100,200)?>" alt="" class="thumbnail"></a> 
                        <div class="recent_entry"><a href="<?=postUrl($rec['post_date'],$rec['post_id'],$rec['post_title'])?>" class="link-name"><?=$rec['post_title']?></a></div>
                    </li>
					<?php endforeach;?>
				</ul>
        </div>
    	<!--/ recent entries -->
        
        <!-- recent entries -->
    	<div class="widget-container widget_recent_entries">
        	<img src="images/icons/icons_16_date.png" alt="" class="widget_icon">  
			<h3 class="widget-title">Latest Information</h3>
                <ul>
                    <?php foreach($latest2 as $rec): ?>
					<li>
                        <a href="<?=postUrl($rec['post_date'],$rec['post_id'],$rec['post_title'])?>"><img src="<?=base_url().thumb(postImage($rec['post_image']),seoUrl($rec['post_title']),100,200)?>" alt="" class="thumbnail"></a> 
                        <div class="recent_entry"><a href="<?=postUrl($rec['post_date'],$rec['post_id'],$rec['post_title'])?>" class="link-name"><?=$rec['post_title']?></a></div>
                    </li>
					<?php endforeach;?>
				</ul>
        </div>
    	<!--/ recent entries -->
                    
    </div>
    <!--/ sidebar -->
    
    <div class="divider"></div>
    
    
        	
</div>
<!--/ middle --> 
</div>
<!--/ container --> 